function offset = apcOffsetGlonass(prn, epoch)
% 
% offsetTable = [...
%          0 0 1.9444; % 1
%     -0.545 0 2.3;    % 2
%     -0.545 0 2.3;    % 3
%          0 0 2.0061; % 4
%          0 0 1.9141; % 5
%     -0.545 0 2.1947; % 6
%     -0.545 0 2.3232; % 7
%     -0.545 0 2.3;    % 8 
%     -0.545 0 2.3;    % 9
%     -0.545 0 2.3;    % 10
%     -0.545 0 2.3;    % 11
%     -0.545 0 2.3;    % 12
%     -0.545 0 2.3;    % 13
%     -0.545 0 2.3;    % 14 
%     -0.545 0 2.3;    % 15
%     -0.545 0 2.3;    % 16
%     -0.545 0 2.3;    % 17
%     -0.545 0 2.3;    % 18
%     -0.545 0 2.3;    % 19
%     -0.545 0 2.3;    % 20
%     -0.545 0 2.3;    % 21
%     -0.545 0 2.3;    % 22
%     -0.545 0 2.2772; % 23
%     -0.545 0 2.3253]; % 24
% 
% 
% 
% if prn > 24
%     offset = [0 0 0]';
% else
%     offset = offsetTable(prn,:)';
% end

offsetTable = [...
            1          679    599011200    788054400            0            0          2.1;...
            1          696    788054400    944784000            0            0       2.1009;...
            1          730    944784000          Inf       -0.545            0       2.5003;...
            2          694    755049600    914198400            0            0       2.0492;...
            2          728    914198400   1056672000       -0.545            0       2.4663;...
            2          747   1056672000          Inf       -0.545            0         2.45;...
            3          663    469324800    691200000            0            0          2.1;...
            3          689    691200000    914198400            0            0       2.1036;...
            3          727    914198400    969926400       -0.545            0       2.3805;...
            3          722    969926400    976492800       -0.545            0       2.5485;...
            3          727    976492800    983836800       -0.545            0       2.3805;...
            3          715    983836800   1002499200       -0.545            0       2.5056;...
            3          801   1002499200   1006732800            0            0       2.0668;...
            3          744   1006732800          Inf       -0.545            0       2.5631;...
            4          662    469324800    755049600            0            0          2.1;...
            4          695    755049600    944784000            0            0       2.1148;...
            4          733    944784000    969926400       -0.545            0       2.4598;...
            4          727    969926400    982713600       -0.545            0       2.3805;...
            4          801    982713600   1002499200            0            0       2.0668;...
            4          742   1002499200          Inf       -0.545            0       2.3811;...
            5          611    691200000    944784000            0            0       2.1133;...
            5          734    944784000          Inf       -0.545            0       2.4893;...
            6          664    469324800    691200000            0            0          2.1;...
            6          690    691200000    755049600            0            0          2.1;...
            6          701    755049600    956448000       -0.545            0       2.3303;...
            6          714    956448000    969926400       -0.545            0       2.1794;...
            6          733    969926400          Inf       -0.545            0       2.4598;...
            7          686    599011200    788054400            0            0          2.1;...
            7          712    788054400   1007942400       -0.545            0       2.4275;...
            7          745   1007942400          Inf       -0.545            0       2.6372;...
            8          684    599011200    788054400            0            0       2.0764;...
            8          697    788054400    914198400            0            0        1.962;...
            8          729    914198400   1031529600       -0.545            0        2.558;...
            8          743   1031529600   1034553600       -0.545            0         2.45;...
            8          712   1034553600   1040169600       -0.545            0       2.4275;...
            8          743   1040169600   1041465600       -0.545            0         2.45;...
            8          801   1041465600   1045612800            0            0       2.0668;...
            8          743   1045612800          Inf       -0.545            0         2.45;...
            9          676    502934400    882576000            0            0          2.1;...
            9          722    882576000    969926400       -0.545            0       2.5485;...
            9          736    969926400   1139616000       -0.545            0       2.4017;...
            9          802   1139616000          Inf            0            0         2.05;...
           10          681    490579200    851040000            0            0          2.1;...
           10          717    851040000          Inf       -0.545            0        2.369;...
           11          685    490579200    882576000            0            0          2.1;...
           11          723    882576000   1150761600       -0.545            0       2.4254;...
           11          853   1150761600          Inf       -0.545            0         2.45;...
           12          667    460598400    967420800            0            0          2.1;...
           12          737    967420800          Inf       -0.545            0       2.5084;...
           13          682    502934400    882576000            0            0          2.1;...
           13          721    882576000          Inf       -0.545            0       2.4179;...
           14          670    460598400    851040000            0            0          2.1;...
           14          715    851040000    976492800       -0.545            0       2.5056;...
           14          722    976492800   1002499200       -0.545            0       2.5485;...
           14          715   1002499200          Inf       -0.545            0       2.5056;...
           15          680    490579200    607478400            0            0          2.1;...
           15          678    607478400    851040000            0            0          2.1;...
           15          716    851040000          Inf       -0.545            0       2.5051;...
           16          675    460598400    967420800            0            0          2.1;...
           16          736    967420800    969926400       -0.545            0       2.4017;...
           16          738    969926400   1141516800       -0.545            0       2.5161;...
           16          736   1141516800          Inf       -0.545            0       2.4017;...
           17          660    450057600    655430400            0            0          2.1;...
           17          687    655430400    877392000            0            0       2.2082;...
           17          718    877392000    976492800       -0.545            0       2.5349;...
           17          714    976492800   1008374400       -0.545            0       2.1794;...
           17          746   1008374400   1112918400       -0.545            0       2.7436;...
           17          714   1112918400   1137888000       -0.545            0       2.1794;...
           17          802   1137888000   1139616000            0            0         2.05;...
           17          714   1139616000   1140307200       -0.545            0       2.1794;...
           17          851   1140307200          Inf       -0.545            0         2.45;...
           18          658    450057600    655430400            0            0          2.1;...
           18          683    655430400    906336000            0            0       2.0694;...
           18          724    906336000   1076716800       -0.545            0       2.4484;...
           18          714   1076716800   1081209600       -0.545            0       2.1794;...
           18          754   1081209600          Inf       -0.545            0         2.45;...
           19          677    478569600    819504000            0            0          2.1;...
           19          698    819504000    877392000            0            0       2.1031;...
           19          720    877392000          Inf       -0.545            0       2.4984;...
           20          665    478569600    825120000            0            0          2.1;...
           20          693    825120000    877392000            0            0       2.1227;...
           20          719    877392000          Inf       -0.545            0       2.4482;...
           21          692    724809600    906336000            0            0       2.0979;...
           21          725    906336000   1090972800       -0.545            0       2.3298;...
           21          755   1090972800          Inf       -0.545            0         2.45;...
           22          666    478569600    724809600            0            0          2.1;...
           22          691    724809600    877392000            0            0       2.0993;...
           22          698    877392000    906336000            0            0       2.1031;...
           22          726    906336000    951436800       -0.545            0       2.4017;...
           22          731    951436800          Inf       -0.545            0        2.411;...
           23          661    450057600    724809600            0            0          2.1;...
           23          693    724809600    825120000            0            0       2.1227;...
           23          714    825120000    952992000       -0.545            0       2.1794;...
           23          732    952992000          Inf       -0.545            0       2.3182;...
           24          688    655430400    819504000            0            0       2.2223;...
           24          713    819504000    951436800       -0.545            0       2.4954;...
           24          735    951436800          Inf       -0.545            0        2.483;...
           26          801   1015804800   1041465600            0            0       2.0668;...
           26          801   1045612800          Inf            0            0       2.0668;...
           27          802   1101340800   1137888000            0            0         2.05];


idx = find(offsetTable(:,1) == prn &  epoch >= offsetTable(:,3) &  epoch < offsetTable(:,4));
       
offset = offsetTable(idx,5:7)';
      
if isempty(offset)
    'breakpont';
end

end